package com.itcoon.cloud.framework.ex.errorcode;


import com.itcoon.cloud.framework.ex.exception.BaseServiceException;

public interface IServiceErrorCode<EX extends BaseServiceException> extends IExceptionCode<EX>{

    default EX newException(String... args){
        EX ex = bindException();
        ex.setArgs(args);
        return ex;
    }

    default EX newException(Throwable cause, String... args){
        EX ex = newException(cause);
        ex.setArgs(args);
        return ex;
    }

    String getServiceCode();

}
